﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 语音识别例子
{
	class Program
	{
		static void Main(string[] args)
		{
			var rv = RecognizedVoice.GetInstance();
			rv.SetWords("一", "二", "三");//设置识别词


			rv.SetCallback(result =>//设置识别回调
			{
				Console.WriteLine("识别结果：" + result[0].Word + " 相似度:" + result[0].Confidence.ToString());
			});


			Console.WriteLine("按任意键改识别词");
			rv.SetWords("四", "五", "六");//改识别词

			Console.WriteLine("识别词已修改");

			Console.WriteLine("按任意键结束");
			Console.ReadKey(true);

			
			rv.SetWords();//将识别词设为空,将会释放里面的资源


		}
	}//Enc Class
}
